package lianxi;

public class lian1 {
    public static void main(String[] args) {
        int a,b,c;
        a=20;
        b=22;
        c=a+b;
        System.out.println("-----------");
        System.out.println("两个整数加法运算");
        System.out.println("-----------");
        System.out.println(a +"+"+ b + "=" +c);
        System.out.println("byb~~~");
        System.out.println("\n\n");//输出2空行

        c=a-b;
        System.out.println("-----------");
        System.out.println("两个整数减法运算");
        System.out.println("-----------");
        System.out.println(a +"-"+ b + "=" +c);
        System.out.println("byb~~~");
        System.out.println("\n\n");//输出二空行


        c=a*b;
        System.out.println("-----------");
        System.out.println("两个整数乘法运算");
        System.out.println("-----------");
        System.out.println(a +"x"+ b + "=" +c);
        System.out.println("byb~~~");
        System.out.println("\n\n");//输出2空行


        double c1;//double为浮点型；
        c1=a*1.0/b;//类型要一致；
        System.out.println("-----------");
        System.out.println("两个整数除法运算");
        System.out.println("-----------");
        System.out.println(a +"/"+ b + "=" +c1);
        System.out.println("byb~~~");
    }
}
